package com.crm.uilt;

/**
 * @author zjd
 * @Title:
 * @Description:
 * @date 2021/4/718:28
 */

import java.util.HashMap;
import java.util.Map;

public class Operate {

    public static final int LOGIN = 1;
    // 内部系统获取数据
    public static final int FETCH_DATA = 2;
    public static final int INSERT = 3;
    public static final int DELETE = 4;
    public static final int UPDATE = 5;
    public static final int SEARCH = 6;
    // TODO more opts

    private static final Map<Integer, String> optMap = new HashMap<>();

    static {
        optMap.put(Operate.LOGIN, "登录");
        optMap.put(Operate.FETCH_DATA, "获取业务数据");
        optMap.put(Operate.INSERT, "新增");
        optMap.put(Operate.DELETE, "删除");
        optMap.put(Operate.UPDATE, "修改");
        optMap.put(Operate.SEARCH, "查询");
    }

    public static String getNameByCode(int code) {
        return optMap.get(code);
    }

}